
<%@ page import="org.gruposp2p.openid.provider.UserDNI" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'userDNI.label', default: 'UserDNI')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${userDNIInstance}">
            <div class="errors">
                <g:renderErrors bean="${userDNIInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${userDNIInstance?.id}" />
                <g:hiddenField name="version" value="${userDNIInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="addresses"><g:message code="userDNI.addresses.label" default="Addresses" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'addresses', 'errors')}">
                                    
<ul>
<g:each in="${userDNIInstance?.addresses?}" var="a">
    <li><g:link controller="address" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="address" action="create" params="['userDNI.id': userDNIInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'address.label', default: 'Address')])}</g:link>

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="accounts"><g:message code="userDNI.accounts.label" default="Accounts" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'accounts', 'errors')}">
                                    
<ul>
<g:each in="${userDNIInstance?.accounts?}" var="a">
    <li><g:link controller="account" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="account" action="create" params="['userDNI.id': userDNIInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'account.label', default: 'Account')])}</g:link>

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="photos"><g:message code="userDNI.photos.label" default="Photos" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'photos', 'errors')}">
                                    
<ul>
<g:each in="${userDNIInstance?.photos?}" var="p">
    <li><g:link controller="photo" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="photo" action="create" params="['userDNI.id': userDNIInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'photo.label', default: 'Photo')])}</g:link>

                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="username"><g:message code="userDNI.username.label" default="Username" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'username', 'errors')}">
                                    <g:textField name="username" value="${userDNIInstance?.username}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="password"><g:message code="userDNI.password.label" default="Password" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'password', 'errors')}">
                                    <g:textField name="password" value="${userDNIInstance?.password}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="email"><g:message code="userDNI.email.label" default="Email" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'email', 'errors')}">
                                    <g:textField name="email" value="${userDNIInstance?.email}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="userOpenID"><g:message code="userDNI.userOpenID.label" default="User Open ID" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'userOpenID', 'errors')}">
                                    <g:textField name="userOpenID" value="${userDNIInstance?.userOpenID}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="nif"><g:message code="userDNI.nif.label" default="Nif" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'nif', 'errors')}">
                                    <g:textField name="nif" value="${userDNIInstance?.nif}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="phone"><g:message code="userDNI.phone.label" default="Phone" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'phone', 'errors')}">
                                    <g:textField name="phone" value="${userDNIInstance?.phone}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="blogURL"><g:message code="userDNI.blogURL.label" default="Blog URL" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'blogURL', 'errors')}">
                                    <g:textField name="blogURL" value="${userDNIInstance?.blogURL}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="dateOfBird"><g:message code="userDNI.dateOfBird.label" default="Date Of Bird" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'dateOfBird', 'errors')}">
                                    <g:datePicker name="dateOfBird" precision="day" value="${userDNIInstance?.dateOfBird}" noSelection="['': '']" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="enabled"><g:message code="userDNI.enabled.label" default="Enabled" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'enabled', 'errors')}">
                                    <g:checkBox name="enabled" value="${userDNIInstance?.enabled}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="accountNonExpired"><g:message code="userDNI.accountNonExpired.label" default="Account Non Expired" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'accountNonExpired', 'errors')}">
                                    <g:checkBox name="accountNonExpired" value="${userDNIInstance?.accountNonExpired}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="credentialsNonExpired"><g:message code="userDNI.credentialsNonExpired.label" default="Credentials Non Expired" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'credentialsNonExpired', 'errors')}">
                                    <g:checkBox name="credentialsNonExpired" value="${userDNIInstance?.credentialsNonExpired}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="accountNonLocked"><g:message code="userDNI.accountNonLocked.label" default="Account Non Locked" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'accountNonLocked', 'errors')}">
                                    <g:checkBox name="accountNonLocked" value="${userDNIInstance?.accountNonLocked}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="authorities"><g:message code="userDNI.authorities.label" default="Authorities" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: userDNIInstance, field: 'authorities', 'errors')}">
                                    
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
